Public Class f_DCTtableselection
    Dim objhdlr As New Cls_DCTDevHdlr
    Private Sub f_DCTtableselection_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim strConString As String = "data source=.;initial catalog=" & f_DCTDevPreparation.f & ";persist security info=False;user id=realm;password=friend;packet size=4096"
        Dim ds As New DataSet
        ds = objhdlr.GetAlltableList(strConString)
        dgdtable.DataSource = ds.Tables(0).DefaultView
        dgdtable.Columns("name").DisplayIndex = 0
        dgdtable.Columns("Column2").DisplayIndex = 1
        dgdtable.Columns("id").Visible = False
        dgdtable.AutoResizeColumns()
    End Sub

    Private Sub btnaccept_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnaccept.Click
        Dim f1 As New f_DCTDeleteTableSelection
        Dim objparent As New Cls_DCTtableselection
        Dim objchild As New Str_DCTtableselection
        Dim altblname As New ArrayList
        Dim strConString As String = "data source=.;initial catalog=" & f_DCTDevPreparation.f & ";persist security info=False;user id=realm;password=friend;packet size=4096"
        Dim i As Integer
        i = dgdtable.Rows.Count
        For i = 0 To i - 1
            objchild.Name = dgdtable.Rows(i).Cells(1).Value
            objchild.tblID = dgdtable.Rows(i).Cells(2).Value
            If dgdtable.Rows(i).Cells(0).Value = 1 Then
                objchild.checked = 1
            Else
                objchild.checked = 0
            End If
            altblname.Add(objchild)
        Next
        objparent.tablenames = altblname
        objhdlr.InsertData(objparent, strConString)
        MessageBox.Show("Tables Selected for DCT successfully")
        Me.Hide()
    End Sub

  
End Class